'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const {
    router,
    controller,
  } = app;
  router.get('/', controller.home.index);
  router.post('/login', controller.home.login);
  router.get('/getArticleList', controller.home.getArticleList);
  router.get('/getSorts', controller.home.getSorts);
  router.get('/getComments', controller.home.getComments);
  router.get('/submitComment', controller.home.submitComment);
  router.get('/submitArticle', controller.home.submitArticle);
  router.get('/updateArticle', controller.home.updateArticle);
  router.get('/addSort', controller.home.addSort);
  router.get('/editSort', controller.home.editSort);
  router.get('/getImage', controller.home.getImage);
};